const Layout = () => import('@/layout/index.vue');

const giftRouter = {
  path: '/gift',
  component: Layout,
  meta: {
    alwaysShow: true,
    title: '礼品兑换管理',
    icon: 'gift',
    roles: ['admin', 'editor']
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/gift/index.vue'),
      name: 'GiftList',
      meta: {
        title: '礼品管理',
        icon: 'list',
        roles: ['admin']
      }
    },
    {
      path: 'create',
      component: () => import('@/views/gift/create.vue'),
      name: 'GiftCreate',
      meta: {
        title: '新增礼品',
        icon: 'add',
        roles: ['admin'],
        hidden: true
      }
    },
    {
      path: 'edit/:id',
      component: () => import('@/views/gift/create.vue'),
      name: 'GiftEdit',
      meta: {
        title: '编辑礼品',
        icon: 'edit',
        roles: ['admin'],
        hidden: true
      }
    },
    {
      path: 'exchange',
      component: () => import('@/views/gift/exchange.vue'),
      name: 'GiftExchange',
      meta: {
        title: '兑换记录',
        icon: 'nested',
        roles: ['admin']
      }
    },

    {
      path: 'category',
      component: () => import('@/views/gift/category.vue'),
      name: 'GiftCategory',
      meta: {
        title: '分类管理',
        icon: 'fenglei',
        roles: ['admin']
      }
    }
  ]
};

export default giftRouter;
